package com.tssup.fesco.common.enumeration;

/**
 * @author haomin
 * @date 2017年3月20日
 * @see
 * @version
 */
public enum OfcOrderStatus {
    WAIT_PAID("等待支付",100),
    ORDER_PAID("订单支付",200),
    OFC_NEW_ORDER("OFC新订单",300),
    SPLIT_ORDER("拆单",400),
    OFC_ORDER_INIT("初始化完成",410),
    CONB_SPLIT_ORDER("组合拆分完成",420),
    PROMOTE_CAL("促销计算完成",430),
    AUDIT("客服审核完成",500),
//            ("商家驳回",550),
//            ("系统撤回",560),
//            ("库房分配完成",600),
//            ("物流商分配完成",610
//            ("POP已接接收",640),
//            ("商家确认订单",650),
//    WAIT_WAREHOUSE_ACCEPT("等待库房接收",700),
//    WAREHOUSE_ACCEPT("仓库已接收",710),
//    ITEM_IN_PLACE("货品就位",720),
//    SEND_DOWN("波次下发",800),
//    BATCH_ORDER_CREATE("批拣单生成",900),
//    BATCH_ORDER_PRINT("批拣单打印",1000),
//    PICKING("拣货索取",1100),
//    PICKING_FINISH("拣货完成",1200),
//    PACKAGING_COMPLETE("打包完成",1300),
    WAIT_SHIPPING("待发货",1350),
    SHIPPING("已发货",1400),
    //            ("WMS转病单",1410),
    Logistics_COLLECT("物流已揽件",1450),
    LOGISTICS_TRANSPORT("物流运输中",1460),
    LOGISTICS_DELIVERY("物流派件中",1470),
    SIGN_IN("订单签收",1500),
    ORDER_REJECT("订单拒收",1600),
    WAIT_REFUND("等待退款",1700),
    GROUNDING("上架",1800),
    ORDER_FINISH("订单完成",1900),
    CANCEL("已取消",2000),
    INVALID("已拆单",2100),
    FINISH("交易完成",2200),
    REFUND("退货",2500),
    ;

    private String name;
    private Integer value;

    private OfcOrderStatus(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public static String getName(Integer value) {
        if(null != value){
            for (OfcOrderStatus t : OfcOrderStatus.values()) {
                if (t.getValue().equals(value)) {
                    return t.getName();
                }
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
}
